package com.aaa.service.back;

import com.aaa.entity.PagerData;
import com.aaa.entity.Warehouse;
import com.aaa.entity.WarehouseDetails;
import com.aaa.entity.WarehouseDetailsQuery;

import java.util.List;
import java.util.Map;

public interface WarehouseService {
    /**
     * 查询仓库信息
     * @return
     */
    List<Map<String,Object>> findWarehouse();

    /**
     * 根据仓库编号查询仓库信息
     * @param warehouseId
     * @return
     */
    Map<String,Object> findWarehouseByWarehouseId(Integer warehouseId);

    /**
     * 查询仓库库存
     * @return
     */
    PagerData<WarehouseDetails> listByPage(WarehouseDetailsQuery warehouseDetailsQuery, Integer curPage, Integer pageSize);

    /**
     * 添加仓库
     * @param warehouse
     * @return
     */
    int addWarehouse(Warehouse warehouse);

    /**
     * 修改仓库
     * @param warehouse
     * @return
     */
    int editWarehouse(Warehouse warehouse);

    /**
     * 添加仓库明细（库存）
     * @param warehouseDetails
     * @return
     */
    int addWarehouseDetails(WarehouseDetails warehouseDetails);

    /**
     * 更新仓库明细（库存）
     * @param goodsCount
     * @param goodsId
     * @param warehouseId
     * @return
     */
    int editWarehouseDetails(Integer goodsCount,String goodsId,Integer warehouseId);

    /**
     * 根据商品编号和仓库编号查询仓库明细（库存）
     * @param goodsId
     * @param warehouseId
     * @return
     */
    WarehouseDetails FindWarehouseDetailsByGoodsIdAndWarehouseId(String goodsId,Integer warehouseId);
}
